
    function textScroll(ele){
        var preele = $(ele),
            actele = preele.children(),
            acteleNew=actele.eq(0).children().clone(true);
        actele.append(acteleNew);

        console.log(actele.height());
        //actele.addClass('gos')
        var acteleHei = actele.height();
        $(actele).animate({'marginTop':-acteleHei/2+'px'},20000,'linear',function(){
            $(this).css({'marginTop':0})
        })
        setInterval(function(){
            $(actele).animate({'marginTop':-acteleHei/2+'px'},20000,'linear',function(){
                $(this).css({'marginTop':0})
            })
        },20002)

    }


    //数字滚滚
    function AnmNub(obj){
        this.Target=obj.Target;
        this.Numbers=obj.Numbers;
        this.Duration=obj.Duration;
        this.Animate=function(Numbers){
            Numbers=Numbers||this.Numbers;
            var boxHei=$(this.Target).height();
            var array=Numbers.toString().split("");
            //遍历数组
            for(var i=0;i<array.length;i++){
                var currentN=array[i];
                //数字append进容器
                var t=$("<ul class=\"box1\" ></ul>");
                $(t).append("<li class=\"childNumber\">"+array[i]+"</div>");
                $(this.Target).append(t);
                //生成滚动数字,根据当前数字大小来定
                for(var j=0;j<=currentN;j++){
                    var tt;
                    if(j==currentN){
                        tt=$("<li class=\"main\">"+j+"</div>");
                    }else{
                        tt=$("<li class=\"childNumber\">"+j+"</div>");
                    }
                    $(t).append(tt);
                }
                $(t).animate({marginTop:-((parseInt(currentN)+1)*boxHei)+"px"},this.Duration,function(){
                    $(this).find(".childNumber").remove();
                    $(this).css({marginTop:0+"px"});
                });
            }
        };
        this.Animate();
        this.ChangeNumber=function(numbers,Duration){
            this.Duration=Duration;
            var boxHei=$(this.Target).height();
            var oldArray = $(this.Target).find('.main').text()
            var newArray=numbers.toString().split("");
            if(oldArray.length!=newArray.length){
                $(this.Target).find('.box1').remove()
                this.Animate(numbers);
                return;
            }
            for(var i=0;i<oldArray.length;i++){
                var o=oldArray[i];
                var n=newArray[i];
                if(o!=n){
                    var c = $(this.Target).find(".box1")[i];
                    for(var j=0;j<=n;j++){
                        var nn;
                        if(j==n){
                            nn=$("<li class=\"main\">"+j+"</li>");
                        }else{
                            nn=$("<li class=\"childNumber\">"+j+"</li>");
                        }
                        $(c).append(nn);
                    }
                    $(c).animate({marginTop:-((parseInt(n)+1)*boxHei)+"px"},this.Duration,function(){

                        $(this).find(".childNumber").remove();
                        $($(this).find(".main")[0]).remove();
                        $(this).css({marginTop:0+"px"});
                    });
                }
            }
            this.Numbers=numbers;
        }
    }

    $.extend({
        myData:function(){
                var mydate = new Date();
                var yea = mydate.getFullYear(); //获取完整的年份(4位,1970-????)
                var mon = mydate.getMonth()+1; //获取当前月份(0-11,0代表1月)
                var datim = mydate.getDate(); //获取当前日(1-31)
                mydate.getDay(); //获取当前星期X(0-6,0代表星期天)
                mydate.getTime(); //获取当前时间(从1970.1.1开始的毫秒数)
                var hou = mydate.getHours(); //获取当前小时数(0-23)
                var min = mydate.getMinutes(); //获取当前分钟数(0-59)
                var sec = mydate.getSeconds(); //获取当前秒数(0-59)
                var spans = $('.slideOne .time span');
                console.log(spans);
            if(mon<10){
                    spans[4].innerText=0;
                    spans[5].innerText=mon
                    spans[18].innerText=0;
                    spans[19].innerText=mon
                }else{
                    mon = mon.toString()
                    spans[4].innerText=1;
                    spans[5].innerText=mon.substr(1,1);
                    spans[18].innerText=1;
                    spans[19].innerText=mon.substr(1,1);
                }
                if(datim<10){
                    spans[6].innerText=0;
                    spans[7].innerText=datim
                    spans[20].innerText=0;
                    spans[21].innerText=datim
                }else{
                    datim = datim.toString()
                    spans[6].innerText=datim.substr(0,1);
                    spans[7].innerText=datim.substr(1,1);
                    spans[20].innerText=datim.substr(0,1);
                    spans[21].innerText=datim.substr(1,1);
                }
                if(hou<10){
                    spans[8].innerText=0;
                    spans[9].innerText=hou;
                    spans[22].innerText=0;
                    spans[23].innerText=hou;
                }else{
                    hou = hou.toString()
                    spans[8].innerText=hou.substr(0,1);
                    spans[9].innerText=hou.substr(1,1);
                    spans[22].innerText=hou.substr(0,1);
                    spans[23].innerText=hou.substr(1,1);
                }
                if(min<10){
                    spans[10].innerText=0;
                    spans[11].innerText=min;
                    spans[24].innerText=0;
                    spans[25].innerText=min;
                }else{
                    min = min.toString()
                    spans[10].innerText=min.substr(0,1);
                    spans[11].innerText=min.substr(1,1);
                    spans[24].innerText=min.substr(0,1);
                    spans[25].innerText=min.substr(1,1);
                }
                if(sec<10){
                    spans[12].innerText=0;
                    spans[13].innerText=sec;
                    spans[26].innerText=0;
                    spans[27].innerText=sec;
                }else{
                    sec = sec.toString()
                    spans[12].innerText=sec.substr(0,1);
                    spans[13].innerText=sec.substr(1,1);
                    spans[26].innerText=sec.substr(0,1);
                    spans[27].innerText=sec.substr(1,1);
                }
            }
    });